<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>

        function Teacher() {
            this.name = "wang"
            this.course = "JS"
        }
        Teacher.prototype = {
            Tskill: "JQ"
        }
        var teacher = new Teacher()

        function Buffer() { }
        Buffer.prototype = Teacher.prototype
        var buffer = new Buffer()

        function Student() {
            this.name = "Li"
            this.skill = "java"
        }
        Student.prototype = buffer
        Student.prototype.age = 18  //解决了

        var student = new Student();
        console.log(student)
        console.log(teacher)

        // console.log(student)
        // console.log(student.course)
        // console.log(student.wife) //????



    </script>
</body>

</html>